<!--#include file="AspCms_SortFun.asp" -->
<!DOCTYPE html>
<html lang="zh-CN" style="min-height: 100%;">
<head>
<title>SortAdd</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />

<link href="https://cdn.bootcss.com/uikit/3.0.0-beta.22/css/uikit.min.css" rel="stylesheet">
<link href="https://cdn.bootcss.com/jquery.perfect-scrollbar/0.7.0/css/perfect-scrollbar.min.css" rel="stylesheet">
<link href="../../css/timoo/fancySelect.css" rel="stylesheet">
<link href="../../css/timoo/timoo.css" rel="stylesheet">

<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="../../ueditor/ueditor.config.js"></script>
<script src="../../ueditor/ueditor.all.min.js"> </script>
<script src="../../ueditor/lang/zh-cn/zh-cn.js"></script>
<script src="https://cdn.bootcss.com/uikit/3.0.0-beta.22/js/uikit.min.js"></script>
<script src="https://cdn.bootcss.com/uikit/3.0.0-beta.22/js/uikit-icons.min.js"></script>
<script src="https://cdn.bootcss.com/jquery.perfect-scrollbar/0.7.0/js/perfect-scrollbar.jquery.min.js"></script>
<script src="../../js/timoo/icheck.min.js"></script>
<script src="../../js/timoo/fancySelect.js"></script>
<script src="../../js/timoo/timoo.js"></script>
</head>
<body>
<div class="tm-right">
    <div class="main">
        <div class="section setting-company">
            <form name="form" action="?action=add" method="post">
                <div class="layout">
                    <div class="title">添加分类</div>
                    <div class="content">
                        <div class="tm-transition list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">分类名称</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="更改了后台的目录后一定要将后台的名称也一起更改，否则会出现错误！"></i>
                            </div>
                            <div class="input">
                                <input type="text" maxLength="200" name="SortName">
                            </div>
                        </div>
                        <% if SwitchNavEn=1 then %>
                        <div class="tm-transition list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">分类英文名称</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="更改了后台的目录后一定要将后台的名称也一起更改，否则会出现错误！"></i>
                            </div>
                            <div class="input">
                                <input type="text" maxLength="200" name="SortEnName" value="">
                            </div>
                        </div>
                        <% end if %>
                        <div class="tm-transition radio table-select list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">所属栏目</span>
                            </div>
                            <div class="uk-clearfix input">
                                <li class="uk-clearfix uk-float-left input-select transverse-select">
                                    <%LoadSelect "ParentID","Aspcms_Sort","SortName","SortID",getForm("id","get"), 0,"order by SortOrder","顶级栏目"%>
                                </li>
                            </div>
                        </div>
                        <div id="Type" class="tm-transition radio table-select list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">分类类型</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="如果该分类为子类，请选择与父类相同的分类类型。"></i>
                            </div>
                            <div class="uk-clearfix input">
                                <li class="uk-clearfix uk-float-left input-select transverse-select">
                                    <%=makeSortTypeSelect("sortType", 2, "")%>
                                </li>
                            </div>
                        </div>
                        <div id="LinkAddress" class="tm-transition list" style="display: none;">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">链接地址</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="留言链接到 “/gbook/”。 "></i>
                            </div>
                            <div class="input">
                                <input type="text" maxlength="200" name="SortURL">
                            </div>
                        </div>
                        <div class="tm-transition list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">分类排序</span>
                            </div>
                            <div class="input">
                                <input type="text" maxlength="200" name="SortOrder" value="0">
                            </div>
                        </div>
                        <div class="tm-transition checkbox list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">是否启用</span>
                            </div>
                            <div class="uk-clearfix input">
                                <label for="Sort-Status" class="uk-clearfix uk-float-left tm-transition">
                                    <span class="uk-float-left check">
                                        <i class="tm-transition icon" uk-icon="icon: check"></i>
                                    </span>
                                    <span class="uk-float-left">启用</span>
                                    <input id="Sort-Status" type="checkbox" checked="checked" name="SortStatus" value="1">
                                </label>
                            </div>
                        </div>
                        <div id="List-Template" class="tm-transition radio table-select list hide">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">列表页模板</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="请选择该分类列表页的模板文件。"></i>
                            </div>
                            <div class="uk-clearfix input">
                                <li class="uk-clearfix uk-float-left input-select transverse-select">
                                    <%tempList "SortTemplate","newslist.html" %>
                                </li>
                            </div>
                        </div>
                        <div id="Article-Template" class="tm-transition radio table-select list hide">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">内容页模板</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="请选择该分类内容详情页的模板文件。"></i>
                            </div>
                            <div class="uk-clearfix input">
                                <li class="uk-clearfix uk-float-left input-select transverse-select">
                                    <%tempList "ContentTemplate","news.html" %>
                                </li>
                            </div>
                        </div>
                        <div id="List-Folder" class="tm-transition input list hide">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">列表页静态化生成目录</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="静态模式下，该分类生成的静态列表页面存放的位置。（ {sitepath}为网站根目录 ）"></i>
                            </div>
                            <div class="uk-clearfix input">
                                <input type="text" maxlength="200" name="SortFolder" id="SortFolder" value="{sitepath}<%=setting.languagePath&htmlDir%>/newslist/">
                            </div>
                        </div>
                        <div id="Content-Folder" class="tm-transition input list hide">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">内容页静态化生成目录</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="静态模式下，该分类生成的静态内容详情页面存放的位置。（ {sitepath}为网站根目录 ）"></i>
                            </div>
                            <div class="uk-clearfix input">
                                <input type="text" maxlength="200" name="ContentFolder" id="ContentFolder" value="{sitepath}<%=setting.languagePath&htmlDir%>/news/">
                            </div>
                        </div>
                        <div id="List-FileName" class="tm-transition input list hide">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">列表页静态化文件命名规则</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="静态模式下，该分类列表生成文件的命名规则。（ {sortid}为该分类的ID值，{page}为页码 ）"></i>
                            </div>
                            <div class="uk-clearfix input">
                                <input type="text" maxlength="200" name="SortFileName" id="SortFileName" value="list-{sortid}-{page}"/>
                            </div>
                        </div>
                        <div id="Content-FileName" class="tm-transition input list hide">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">内容页静态化文件命名规则</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="静态模式下，该分类内容详情页生成文件的命名规则。（ {y}年，{m}月，{d}日，{id}文章编号 ）"></i>
                            </div>
                            <div class="uk-clearfix input">
                                <input type="text" maxlength="200" name="ContentFileName" id="ContentFileName" value="{y}-{m}-{d}/{id}"/>
                            </div>
                        </div>
                        <div class="tm-transition radio list hide">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">浏览权限</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="该分类的访问权限的设定。（ 隶属：权限值≥该用户组可查看；专属：权限值＝该用户组可查看）"></i>
                            </div>
                            <div class="uk-clearfix input">
                                <li class="uk-clearfix uk-float-left input-select transverse-select">
                                    <%=userGroupSelect("GroupID", 0, 0)%>
                                </li>
                                <label for="Power-Subjection" class="uk-clearfix uk-float-left tm-transition">
                                    <span class="uk-float-left check">
                                        <i class="tm-transition icon" uk-icon="icon: check"></i>
                                    </span>
                                    <span class="uk-float-left">隶属</span>
                                    <input id="Power-Subjection" type="radio" name="Exclusive" value=">=" checked="checked">
                                </label>
                                <label for="Power-Exclusive" class="uk-clearfix uk-float-left tm-transition">
                                    <span class="uk-float-left check">
                                        <i class="tm-transition icon" uk-icon="icon: check"></i>
                                    </span>
                                    <span class="uk-float-left">专属</span>
                                    <input id="Power-Exclusive" type="radio" name="Exclusive" value="="> 
                                </label>
                            </div>
                        </div>
                        <div class="tm-transition editor list hide">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">内容</span>
                                <a href="javascript:void()" onClick="SetEditorPage('Content', '{aspcms:page}')">
                                    插入分页（{aspcms:page}）
                                </a>
                            </div>
                            <div class="uk-clearfix input">
                                <textarea name="Content" id="myEditor"><%=content%></textarea>
                                <script> UE.getEditor('myEditor'); </script>
                            </div>
                        </div>
                        <div class="tm-transition input list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">栏目图片</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="栏目图片，可在前台调用。"></i>
                            </div>
                            <div class="uk-clearfix input">
                                <input type="text" maxlength="255" id="IcoImage" name="IcoImage" value=" ">
                            </div>
                        </div>
                        <div class="tm-transition list have upload picture-upload">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">上传栏目图片</span>
                            </div>
                            <div class="input">
                                <iframe name="image" frameborder="0" width='100%' height="40" scrolling="no" src="../../editor/upload.asp?sortType=3&stype=file&Tobj=IcoImage" allowTransparency="true"></iframe>
                            </div>
                        </div>
                        <div class="tm-transition input list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">文章缩略图</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="栏目图片，可在前台调用。"></i>
                            </div>
                            <div class="uk-clearfix input">
                                <input type="text" name="indeximage" id="indeximage" value="<%=indeximage%> ">
                                <input type="hidden" name="ImagePath" id="ImagePath" value="<%=ImagePath%>">
                                <!--<input type="checkbox" name="AutoRemote" value='1'> 自动保存远程图片 -->
                            </div>
                        </div>
                        <!--
                        <div class="tm-transition radio table-select list hide">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">从上传的图片中选择</span>
                            </div>
                            <div class="uk-clearfix input">
                                <li class="uk-clearfix uk-float-left input-select transverse-select">
                                    <select class="tm-select" name="ImageFileList" id="ImageFileList" onChange="indeximage.value=this.value;">
                                        <option value=''>不选择首页推荐图片</option>
                                    </select>
                                    <input type="button" name="selectpic" value="从已上传图片中选择" onClick="SelectPhoto()">
                                </li>
                            </div>
                        </div>
                        -->
                        <div class="tm-transition list have upload picture-upload">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">上传文章图片</span>
                            </div>
                            <div class="input">
                                <iframe name="image" frameborder="0" width='100%' height="40" scrolling="no" src="../../editor/upload.asp?sortType=16&stype=image&Tobj=content" allowTransparency="true"></iframe>
                            </div>
                        </div>
                        <div class="tm-transition list picture-list radio">
                            <div class="picture-box">
                                <div id="pw" uk-grid>
                                <%
                                    if not isnul(ImagePath) then 
                                        dim j,images
                                        images=split(ImagePath,"|")
                                        for j=0 to ubound(images)
                                            echo "<div id='img"&j&"' class='uk-width-1-6 image-box'><div class='box'><a class='uk-cover-container' href=""javascript:SetEditorContents('Content','"&images(j)&"')""><img src="""&images(j)&""" uk-cover></a><div class='uk-clearfix images-control'><div class='uk-float-left images-input'><label for='Images"&j&"' class='uk-clearfix uk-float-left tm-transition'><input id='Images"&j&"' type='radio' value='"&images(j)&"' name='IndexImageradio' onclick=""setIndexImage('"&images(j)&"')""><span class='text'>设为缩略图</span></label></div><div class='uk-float-right del-link'><a href=""javascript:dropThisDiv('img"&j&"','"&images(j)&"')"">删除</a></div></div></div></div>"
                                        next
                                    end if
                                %>
                                </div>
                            </div>
                            <script>
                                function SetEditorContents(EditorName, ContentStr){
                                    UE.getEditor('myEditor').execCommand('insertHtml', "<img src="+"'"+ContentStr+"'"+"/>")	
                                }
                                function SetEditorPage(EditorName, ContentStr) {
                                    UE.getEditor('myEditor').execCommand('insertHtml', ContentStr)		
                                }
                            </script>
                        </div>
                        <div class="tm-transition input list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">SEO页面标题</span>
                            </div>
                            <div class="uk-clearfix input">
                                <input type="text" maxlength="200" name="PageTitle">
                            </div>
                        </div>
                        <div class="tm-transition input list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">SEO页面关键词</span>
                            </div>
                            <div class="uk-clearfix input">
                                <input type="text" maxlength="200" name="PageKeywords">
                            </div>
                        </div>
                        <div class="tm-transition textarea list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">SEO页面描述</span>
                            </div>
                            <div class="input">
                                <textarea name="PageDesc"></textarea>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layout">
                    <div class="title">保存更改</div>
                    <div class="content">
                        <div class="uk-clearfix tm-transition list submit">
                            <div class="uk-float-left input">
                                <input type="submit" value="保存">
                            </div>
                            <div class="uk-float-left input">
                                <input type="button" value="返回" onClick="history.go(-1)"> 
                            </div>
                            <div class="uk-float-left input">
                                <input type="button" value="刷新" onClick="location.href='<%=getPageName()%>'">
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    
function tm_type_select(){
        
    var Type = jQuery('#Type');
    
    Type.on('DOMNodeInserted', '.trigger', function(){
        
        //获取选中的分类类型
        var Text = jQuery(this).text();
        
        //判断分类类型
        if( Text === '单篇' ){
            
            //显示所有隐藏的内容
            jQuery('.hide').css('display', 'block');
            
            //隐藏不必要的栏目
            jQuery('#LinkAddress').css('display', 'none');
            jQuery('#Content-Folder').css('display', 'none');
            jQuery('#Content-FileName').css('display', 'none');
            
            
            //隐藏内容页模板
            jQuery('#Article-Template').css('display', 'none');
            
            //设置列表页模板
            jQuery('#List-Template .trigger').text('about.html');
            
            //选中列表页模板
            jQuery('#List-Template .options li').each(function(){
                
                if( jQuery(this).attr('data-raw-value') === 'about.html' ){
                    
                    jQuery('#SortTemplate').val('about.html');
                    jQuery(this).addClass('selected');
                    
                } else {
                    
                    jQuery(this).removeClass('selected');

                }
                
            })
            
            //设置列表页静态化生成目录
            jQuery('#SortFolder').val('{sitepath}<%=setting.languagePath&htmlDir%>/about/');
            
            //设置列表页静态化文件命名规则
            jQuery('#SortFileName').val('about-{sortid}');
            
        } else if( Text === '文章' ){
            
            //显示所有隐藏的内容
            jQuery('.hide').css('display', 'block');
            
            //设置列表页模板
            jQuery('#List-Template .trigger').text('newslist.html');
            
            //选中列表页模板
            jQuery('#List-Template .options li').each(function(){
                
                if( jQuery(this).attr('data-raw-value') === 'newslist.html' ){
                    
                    jQuery('#SortTemplate').val('newslist.html');
                    jQuery(this).addClass('selected');
                    
                } else {
                    
                    jQuery(this).removeClass('selected');

                }
                
            })
            
            //设置内容页模板
            jQuery('#Article-Template .trigger').text('news.html');
            
            //选中内容页模板
            jQuery('#List-Template .options li').each(function(){
                
                if( jQuery(this).attr('data-raw-value') === 'news.html' ){
                    
                    jQuery('#ContentTemplate').val('news.html');
                    jQuery(this).addClass('selected');
                    
                } else {
                    
                    jQuery(this).removeClass('selected');

                }
                
            })
            
            //设置列表页静态化生成目录
            jQuery('#SortFolder').val('{sitepath}<%=setting.languagePath&htmlDir%>/newslist/');
            
            //设置内容页静态化生成目录
            jQuery('#ContentFolder').val('{sitepath}<%=setting.languagePath&htmlDir%>/news/');
            
            //设置列表页静态化文件命名规则
            jQuery('#SortFileName').val('list-{sortid}-{page}');
            
            //设置内容页静态化文件命名规则
            jQuery('#ContentFileName').val('{y}-{m}-{d}/{id}');
            
            
        } else if( Text === '产品' ){
            
            //显示所有隐藏的内容
            jQuery('.hide').css('display', 'block');
            
            //设置列表页模板
            jQuery('#List-Template .trigger').text('productlist.html');
            
            //选中列表页模板
            jQuery('#List-Template .options li').each(function(){
                
                if( jQuery(this).attr('data-raw-value') === 'productlist.html' ){
                    
                    jQuery('#SortTemplate').val('productlist.html');
                    jQuery(this).addClass('selected');
                    
                } else {
                    
                    jQuery(this).removeClass('selected');

                }
                
            })
            
            //设置内容页模板
            jQuery('#Article-Template .trigger').text('product.html');
            
            //选中内容页模板
            jQuery('#List-Template .options li').each(function(){
                
                if( jQuery(this).attr('data-raw-value') === 'product.html' ){
                    
                    jQuery('#ContentTemplate').val('product.html');
                    jQuery(this).addClass('selected');
                    
                } else {
                    
                    jQuery(this).removeClass('selected');

                }
                
            })
            
            //设置列表页静态化生成目录
            jQuery('#SortFolder').val('{sitepath}<%=setting.languagePath&htmlDir%>/productlist/');
            
            //设置内容页静态化生成目录
            jQuery('#ContentFolder').val('{sitepath}<%=setting.languagePath&htmlDir%>/product/');
            
            //设置列表页静态化文件命名规则
            jQuery('#SortFileName').val('list-{sortid}-{page}');
            
            //设置内容页静态化文件命名规则
            jQuery('#ContentFileName').val('{y}-{m}-{d}/{id}');
            
            
        } else if( Text === '下载' ){
            
            //显示所有隐藏的内容
            jQuery('.hide').css('display', 'block');
            
            //设置列表页模板
            jQuery('#List-Template .trigger').text('downlist.html');
            
            //选中列表页模板
            jQuery('#List-Template .options li').each(function(){
                
                if( jQuery(this).attr('data-raw-value') === 'downlist.html' ){
                    
                    jQuery('#SortTemplate').val('downlist.html');
                    jQuery(this).addClass('selected');
                    
                } else {
                    
                    jQuery(this).removeClass('selected');

                }
                
            })
            
            //设置内容页模板
            jQuery('#Article-Template .trigger').text('down.html');
            
            //选中内容页模板
            jQuery('#List-Template .options li').each(function(){
                
                if( jQuery(this).attr('data-raw-value') === 'down.html' ){
                    
                    jQuery('#ContentTemplate').val('down.html');
                    jQuery(this).addClass('selected');
                    
                } else {
                    
                    jQuery(this).removeClass('selected');

                }
                
            })
            
            //设置列表页静态化生成目录
            jQuery('#SortFolder').val('{sitepath}<%=setting.languagePath&htmlDir%>/downlist/');
            
            //设置内容页静态化生成目录
            jQuery('#ContentFolder').val('{sitepath}<%=setting.languagePath&htmlDir%>/down/');
            
            //设置列表页静态化文件命名规则
            jQuery('#SortFileName').val('list-{sortid}-{page}');
            
            //设置内容页静态化文件命名规则
            jQuery('#ContentFileName').val('{y}-{m}-{d}/{id}');
            
            
        } else if( Text === '招聘' ){
            
            //显示所有隐藏的内容
            jQuery('.hide').css('display', 'block');
            
            //设置列表页模板
            jQuery('#List-Template .trigger').text('joblist.html');
            
            //选中列表页模板
            jQuery('#List-Template .options li').each(function(){
                
                if( jQuery(this).attr('data-raw-value') === 'joblist.html' ){
                    
                    jQuery('#SortTemplate').val('joblist.html');
                    jQuery(this).addClass('selected');
                    
                } else {
                    
                    jQuery(this).removeClass('selected');

                }
                
            })
            
            //设置内容页模板
            jQuery('#Article-Template .trigger').text('job.html');
            
            //选中内容页模板
            jQuery('#List-Template .options li').each(function(){
                
                if( jQuery(this).attr('data-raw-value') === 'job.html' ){
                    
                    jQuery('#ContentTemplate').val('job.html');
                    jQuery(this).addClass('selected');
                    
                } else {
                    
                    jQuery(this).removeClass('selected');

                }
                
            })
            
            //设置列表页静态化生成目录
            jQuery('#SortFolder').val('{sitepath}<%=setting.languagePath&htmlDir%>/jobtlist/');
            
            //设置内容页静态化生成目录
            jQuery('#ContentFolder').val('{sitepath}<%=setting.languagePath&htmlDir%>/job/');
            
            //设置列表页静态化文件命名规则
            jQuery('#SortFileName').val('list-{sortid}-{page}');
            
            //设置内容页静态化文件命名规则
            jQuery('#ContentFileName').val('{y}-{m}-{d}/{id}');
            
            
        } else if( Text === '相册' ){
            
            //显示所有隐藏的内容
            jQuery('.hide').css('display', 'block');
            
            //设置列表页模板
            jQuery('#List-Template .trigger').text('albumlist.html');
            
            //选中列表页模板
            jQuery('#List-Template .options li').each(function(){
                
                if( jQuery(this).attr('data-raw-value') === 'albumlist.html' ){
                    
                    jQuery('#SortTemplate').val('albumlist.html');
                    jQuery(this).addClass('selected');
                    
                } else {
                    
                    jQuery(this).removeClass('selected');

                }
                
            })
            
            //设置内容页模板
            jQuery('#Article-Template .trigger').text('album.html');
            
            //选中内容页模板
            jQuery('#List-Template .options li').each(function(){
                
                if( jQuery(this).attr('data-raw-value') === 'album.html' ){
                    
                    jQuery('#ContentTemplate').val('album.html');
                    jQuery(this).addClass('selected');
                    
                } else {
                    
                    jQuery(this).removeClass('selected');

                }
                
            })
            
            //设置列表页静态化生成目录
            jQuery('#SortFolder').val('{sitepath}<%=setting.languagePath&htmlDir%>/albumtlist/');
            
            //设置内容页静态化生成目录
            jQuery('#ContentFolder').val('{sitepath}<%=setting.languagePath&htmlDir%>/album/');
            
            //设置列表页静态化文件命名规则
            jQuery('#SortFileName').val('list-{sortid}-{page}');
            
            //设置内容页静态化文件命名规则
            jQuery('#ContentFileName').val('{y}-{m}-{d}/{id}');
            
            
        } else if( Text === '视频' ){
            
            //显示所有隐藏的内容
            jQuery('.hide').css('display', 'block');
            
            //设置列表页模板
            jQuery('#List-Template .trigger').text('videolist.html');
            
            //选中列表页模板
            jQuery('#List-Template .options li').each(function(){
                
                if( jQuery(this).attr('data-raw-value') === 'videolist.html' ){
                    
                    jQuery('#SortTemplate').val('videolist.html');
                    jQuery(this).addClass('selected');
                    
                } else {
                    
                    jQuery(this).removeClass('selected');

                }
                
            })
            
            //设置内容页模板
            jQuery('#Article-Template .trigger').text('video.html');
            
            //选中内容页模板
            jQuery('#List-Template .options li').each(function(){
                
                if( jQuery(this).attr('data-raw-value') === 'video.html' ){
                    
                    jQuery('#ContentTemplate').val('video.html');
                    jQuery(this).addClass('selected');
                    
                } else {
                    
                    jQuery(this).removeClass('selected');

                }
                
            })
            
            //设置列表页静态化生成目录
            jQuery('#SortFolder').val('{sitepath}<%=setting.languagePath&htmlDir%>/videolist/');
            
            //设置内容页静态化生成目录
            jQuery('#ContentFolder').val('{sitepath}<%=setting.languagePath&htmlDir%>/video/');
            
            //设置列表页静态化文件命名规则
            jQuery('#SortFileName').val('list-{sortid}-{page}');
            
            //设置内容页静态化文件命名规则
            jQuery('#ContentFileName').val('{y}-{m}-{d}/{id}');
            
            
        } else if( Text === '链接' ){
            
            jQuery('.hide').css('display', 'none');
            jQuery('#LinkAddress').css('display', 'block');
            
        } else {
            
            jQuery('.hide').css('display', 'block');
            jQuery('#LinkAddress').css('display', 'none');
            jQuery('#Article-Template').css('display', 'block');
            
        }
        
    })
        
}
    
tm_type_select();
    
function dropThisDiv(t,p){
    
    document.getElementById(t).style.display='none'
    var str =document.getElementById("ImagePath").value;
    var arr = str.split("|");
    var nstr="";
    
    for (var i=0; i<arr.length; i++){
        
        if(arr[i]!=p){
            
            if (nstr!=""){
                
                nstr=nstr+"|";
            
            }	
            
            nstr=nstr+arr[i]
        
        }
    
    }
    
    document.getElementById("ImagePath").value=nstr;
    
    doChange(document.getElementById("ImagePath"),document.getElementById("ImageFileList"))

}

function setIndexImage(t){
    
    document.getElementById("indeximage").value=t
    
    doChange(document.getElementById("ImagePath"),document.getElementById("ImageFileList"))

}

function doChange(objText, objDrop){
    
    if (!objDrop) return;
    
    var str = objText.value;
    var arr = str.split("|");
    var nIndex = objDrop.selectedIndex;
    
    objDrop.length=1;
    
    for (var i=0; i<arr.length; i++){
        
        objDrop.options[objDrop.length] = new Option(arr[i], arr[i]);
    
    }
    
    objDrop.selectedIndex = nIndex;

}

doChange(document.getElementById("ImagePath"),document.getElementById("ImageFileList"))
    
</script>

</body>
</html>